<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<head>
    <script type="text/javascript">
        function doSearch() {
        	grid.load({
                service_no : $('#service_no').val(),
                service_name : $('#service_name').val(),
                service_st : $('#service_st').val(),
                param_no : $('#param_no').val(),
                param_name : $('#param_name').val(),
                param_st : $('#param_st').val()
            });
        }
        function addServiceParam(url){
            commonDetail(url,"save","serviceParamTableId");
        }
        function modifyServiceParam(url){
            commonDetail(url,"update","serviceParamTableId");
        }
        function startServiceParam(url) {
            asyncOper(url, "确定要启用这些业务参数吗");
        }
        function freezeServiceParam(url) {
            asyncOper(url, "确定要停用这些业务参数吗");
        }
		var grid;
        $(document).ready(function() {
        	grid = $("#serviceParamTableId").jpgrid({
                url: "getServiceParamListJson.do",
                columns: [
                    {title: "业务编号", field: "SERVICE_NO",width:120},
                    {title: "业务名称", field: "SERVICE_NAME",width:120},
                    {title: "业务状态", field: "SERVICE_ST",width:120},
                    {title: "业务参数编号", field: "PARAM_NO",width:120},
                    {title: "业务参数名称", field: "PARAM_NAME",width:120},
                    {title: "业务参数状态", field: "PARAM_ST",width:120}
                ]
            });
        });
        function asyncOper(url, msg){
    		commonAsync(url, "serviceParamTableId", msg, function(result){
    			grid.reload();
    		});
    	}
    </script>
</head>
<body class="easyui-layout list_body">
<form id="serviceParamForm" name="serviceParamForm" >
	<div class="list_body_north" data-options="region:'north'" border="false">
	    <!-- 查询表单 -->
	        <div  class="datagrid-toolbar" border="false">
	            <span>业务编号:</span>
	            <input id="service_no" type="text" name="service_no"  class="easyui-textbox"  >
	            <span>业务名称:</span>
	            <input id="service_name" type="text" name="service_name"  class="easyui-textbox"  >
	            <span>业务状态:</span>
	            <code:codeSelect id="service_st" name="service_st" code_type="service_st" showSelect="true" selectId="${serviceParamEntity.service_st}"></code:codeSelect>
	            <span>业务参数编号:</span>
	            <input id="param_no" type="text" name="param_no"  class="easyui-textbox"  >
	            <span>业务参数名称:</span>
	            <input id="param_name" type="text" name="param_name"  class="easyui-textbox"  >
	            <span>业务参数状态:</span>
	            <code:codeSelect id="param_st" name="param_st" code_type="service_st" showSelect="true" selectId="${serviceParamEntity.param_st}"></code:codeSelect>
	            <a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch()">查询</a>
	            <a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm()">重置</a>
	        </div>
	    <!-- 自定义标签工具栏 -->
	    <jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>
    </div>
	<div data-options="region:'center'" border="false" class="list_body_center">
	    <!-- 表格 -->
	    <table id="serviceParamTableId" fit="true"></table>
    </div>
</form>
</body>
</html>
